<%@ page language="java" import="java.util.*,com.fescoservice.model.*" pageEncoding="UTF-8"%>

<%
	String langfilename = "/resources/message";
	Long countl =(Long) request.getAttribute("counts");
	String counts = Long.toString(countl);
	List categorylist =(List<Category>) request.getAttribute("categorylist");
	List code1names =(List<Category>) request.getAttribute("code1names");
	List code2names =(List<Category>) request.getAttribute("code2names");
%>
<%@include file="../common/LocaleManager.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Fesco Service</title>
		<link rel="stylesheet" href="<%=path%>/js/jquery/themes/redmond/jquery.ui.all.css">
		<script src="<%=path%>/js/jquery/jquery-1.5.1.js"></script>
		<script src="<%=path%>/js/jquery/external/jquery.bgiframe-2.1.2.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.core.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.widget.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.mouse.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.button.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.draggable.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.position.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.resizable.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.ui.dialog.js"></script>
		<script src="<%=path%>/js/jquery/ui/jquery.effects.core.js"></script>
		<link rel="stylesheet" href="<%=path%>/css/admin.css">
	
		<style type="text/css">
		
		</style>
		<script type="text/javascript">
			$(function() {
				var tips = $(".validateTips");		
				
				function updateTips(t) {
					tips.text(t).addClass("ui-state-highlight");
					setTimeout(function() {
						tips.removeClass("ui-state-highlight", 1500);
					}, 500);
				}
		
				function checkLength(o, n, min, max) {
					if (o.val().length > max || o.val().length < min) {
						o.addClass("ui-state-error");
						updateTips('<%=resource.getString("FS_T_LENGTH")%> ' + n + ' <%=resource.getString("FS_T_BETWEEN")%> ' + min
								+ ' <%=resource.getString("FS_T_AND")%> ' + max + '<%=resource.getString("FS_T_DOT")%>');
						return false;
					} else {
						return true;
					}
				}
				
				function checkCode1Names(o) {
					var existFlag = false;
					/*dwr.engine.setAsync(false);
					CategoryAjaxController.checkCode1NameExist(o.val(),
						{callback:function(dataFromServer){
								existFlag = eval(dataFromServer);
							} 
						}); 					
					dwr.engine.setAsync(true);*/
					if (existFlag) {
						o.addClass("ui-state-error");
						updateTips("<%=resource.getString("FS_T_CODEOF")%>" + o.val() + "<%=resource.getString("FS_T_CODESUFFIX")%> <%=resource.getString("FS_T_EXIST")%><%=resource.getString("FS_T_DOT")%>");
						return false;
					} else {
						return true;
					}
				}
				
				function checkCode2Names(o,boardCode1) {
					var existFlag = false;
					var lang = '<%=request.getSession().getAttribute("userLanguage")%>';
					/*dwr.engine.setAsync(false);
					CategoryAjaxController.getCode2Names(lang,boardCode1,
						{callback:function(dataFromServer){
								var code2Array = eval(dataFromServer);
								for(var i=0;i<code2Array.length ;i++){
									if(code2Array[i].value == o.val().trim()){
										 existFlag = true;
									}
								}
							} 
						}); 				
					dwr.engine.setAsync(true);*/
					if (existFlag) {
						o.addClass("ui-state-error");
						updateTips("<%=resource.getString("FS_T_CODEOF")%>" + o.val() + "<%=resource.getString("FS_T_CODESUFFIX")%> <%=resource.getString("FS_T_EXIST")%><%=resource.getString("FS_T_DOT")%>");
						return false;
					} else {
						return true;
					}
				}
				
				function checkRegexp(o, regexp, n) {
					if (!(regexp.test(o.val()))) {
						o.addClass("ui-state-error");
						updateTips(n);
						return false;
					} else {
						return true;
					}
				}
				$("#dialog1")
						.dialog(
								{
									autoOpen : false,
									height : 320,
									width : 350,
									modal : true,
									buttons : {
										'<%=resource.getString("FS_T_CREATE")%>' : function() {
											var bValid = true;
											var boardcode1 = $("#boardcode11"),
											 	code1name = $("#code1name1"),
											 	allFields = $([]).add(boardcode1).add(code1name);
											
											allFields.removeClass("ui-state-error");
		
											bValid = bValid
													&& checkLength(boardcode1,
															'<%=resource.getString("FS_T_BOARDCODE1")%>', 6, 6);											
											bValid = bValid
													&& checkLength(code1name,
															'<%=resource.getString("FS_T_CODE1NAME")%>', 1, 20);									
											bValid = bValid
													&& checkRegexp(boardcode1,
															/^[F][L][0-9]{3}[1-9]$/i,
															"<%=resource.getString("FS_T_BOARDCODE1")%> <%=resource.getString("FS_T_AS")%> 'FL0001' .");
														
											bValid = bValid
													&& checkCode1Names(boardcode1);
											
											if (bValid) {
												document.forms.categoryId.action = '<%=path%>/action/Category.htm?cmd=add';
												document.forms.categoryId.boardCode1.value = boardcode1.val();
												document.forms.categoryId.boardCode2.value = "FM0000";
												document.forms.categoryId.boardCode3.value = "FB0000";
												document.forms.categoryId.code1Name.value = code1name.val();
												document.forms.categoryId.code2Name.value = "0";
												document.forms.categoryId.code3Name.value = "0";
												//$(this).dialog("close");
												document.forms.categoryId.submit();
											}
										},
										'<%=resource.getString("FS_T_CANCEL")%>' : function() {
											$(this).dialog("close");
										}
									},
									close : function() {
										allFields.val("").removeClass("ui-state-error");
										$(this).dialog("close");
									}
								});
								
				$("#dialog2")
						.dialog(
								{
									autoOpen : false,
									height : 400,
									width : 350,
									modal : true,
									buttons : {
										'<%=resource.getString("FS_T_CREATE")%>' : function() {
											var bValid = true;
											var boardcode1 = $("#boardcode12"), 
												boardcode2 = $("#boardcode22"), 
												code2name = $("#code2name2"),
												allFields = $([]).add(boardcode1).add(boardcode2).add(code2name);
		
											allFields.removeClass("ui-state-error");
											bValid = bValid
													&& checkRegexp(boardcode1,/^[F][L][0-9]{3}[1-9]$/i,
															'<%=resource.getString("FS_T_BOARDCODE1")%> <%=resource.getString("FS_M_NOTBLANK")%>');
											
											bValid = bValid
													&& checkLength(boardcode2,
															'<%=resource.getString("FS_T_BOARDCODE2")%>', 6, 6);
											bValid = bValid
													&& checkLength(code2name,
															'<%=resource.getString("FS_T_CODE2NAME")%>', 1, 20);
											bValid = bValid
													&& checkRegexp(boardcode2,
															/^[F][M][0-9]{3}[1-9]$/i,
															"<%=resource.getString("FS_T_BOARDCODE2")%> <%=resource.getString("FS_T_AS")%> 'FM0012' .");
											bValid = bValid
													&& checkCode2Names(boardcode2,boardcode1.val());
											if (bValid) {
												document.forms.categoryId.action = '<%=path%>/action/Category.htm?cmd=add';
												document.forms.categoryId.boardCode1.value = boardcode1.val();
												document.forms.categoryId.boardCode2.value = boardcode2.val();
												document.forms.categoryId.boardCode3.value = "FB0000";
												document.forms.categoryId.code1Name.value = boardcode1.find('option:selected').text();
												document.forms.categoryId.code2Name.value = code2name.val();
												document.forms.categoryId.code3Name.value = "0";
												//$(this).dialog("close");
												document.forms.categoryId.submit();
											}
										},
										'<%=resource.getString("FS_T_CANCEL")%>' : function() {
											$(this).dialog("close");
										}
									},
									close : function() {
										allFields.val("").removeClass("ui-state-error");
										$(this).dialog("close");
									}
								});
				$("#dialog3")
						.dialog(
								{
									autoOpen : false,
									height : 460,
									width : 350,
									modal : true,
									buttons : {
										'<%=resource.getString("FS_T_CREATE")%>' : function() {
											var bValid = true;
											var boardcode1 = $("#boardcode13"), 
												boardcode2 = $("#boardcode23"), 
												boardcode3 = $("#boardcode33"), 
												code3name = $("#code3name3"), 
												allFields = $([]).add(boardcode1).add(boardcode2).add(boardcode3).add(code3name);
		
											allFields.removeClass("ui-state-error");
											bValid = bValid
													&& checkRegexp(boardcode1,/^[F][L][0-9]{3}[1-9]$/i,
															'<%=resource.getString("FS_T_BOARDCODE1")%> <%=resource.getString("FS_M_NOTBLANK")%> ');
											bValid = bValid
													&& checkRegexp(boardcode2,/^[F][M][0-9]{3}[1-9]$/i,
															'<%=resource.getString("FS_T_BOARDCODE2")%> <%=resource.getString("FS_M_NOTBLANK")%> ');
											
											bValid = bValid
													&& checkLength(boardcode3,
															'<%=resource.getString("FS_T_BOARDCODE3")%>', 6, 6);
											bValid = bValid
													&& checkLength(code3name,
															'<%=resource.getString("FS_T_CODE3NAME")%>', 1, 20);
					
											bValid = bValid
													&& checkRegexp(boardcode3,
															/^[F][B][0-9]{3}[1-9]$/i,
															"Code<%=resource.getString("FS_T_BOARDCODE3")%> <%=resource.getString("FS_T_AS")%> 'FB0123' .");
											if (bValid) {
												document.forms.categoryId.action = '<%=path%>/action/Category.htm?cmd=add';
												document.forms.categoryId.boardCode1.value = boardcode1.val();
												document.forms.categoryId.boardCode2.value = boardcode2.val();
												document.forms.categoryId.boardCode3.value = boardcode3.val();
												document.forms.categoryId.code1Name.value = boardcode1.find('option:selected').text();
												document.forms.categoryId.code2Name.value = boardcode2.find('option:selected').text();
												document.forms.categoryId.code3Name.value = code3name.val();
												//$(this).dialog("close");
												document.forms.categoryId.submit();
											}
										},
										'<%=resource.getString("FS_T_CANCEL")%>' : function() {
											$(this).dialog("close");
										}
									},
									close : function() {
										allFields.val("").removeClass("ui-state-error");
										$(this).dialog("close");
									}
								});
					$("#dialogM")
						.dialog(
								{
									autoOpen : false,
									height : 500,
									width : 350,
									modal : true,
									buttons : {
										'<%=resource.getString("FS_T_SAVE")%>' : function() {
											var bValid = true;
											
											var boardcode1 = $("#boardcode1M"), 
												boardcode2 = $("#boardcode2M"), 
												boardcode3 = $("#boardcode3M"), 
												code1name = $("#code1nameM"), 
												code2name = $("#code2nameM"), 
												code3name = $("#code3nameM"), 
												allFields = $([]).add(boardcode1).add(boardcode2).add(boardcode3).add(code1name).add(code2name).add(code3name);
		
											allFields.removeClass("ui-state-error");
											bValid = bValid
													&& checkLength(code1name,
															'<%=resource.getString("FS_T_CODE1NAME")%>', 1, 20);
											bValid = bValid
													&& checkLength(code2name,
															'<%=resource.getString("FS_T_CODE2NAME")%>', 1, 20);
											bValid = bValid
													&& checkLength(code3name,
															'<%=resource.getString("FS_T_CODE3NAME")%>', 1, 20);
					
											if (bValid) {
												document.forms.categoryId.action = '<%=path%>/action/Category.htm?cmd=update';
												document.forms.categoryId.boardCode1.value = boardcode1.val();
												document.forms.categoryId.boardCode2.value = boardcode2.val();
												document.forms.categoryId.boardCode3.value = boardcode3.val();
												document.forms.categoryId.code1Name.value = code1name.val();
												document.forms.categoryId.code2Name.value = code2name.val();
												document.forms.categoryId.code3Name.value = code3name.val();
												document.forms.categoryId.submit();
											}
										},
										'<%=resource.getString("FS_T_DELETE")%>' : function() {
											var boardcode1 = $("#boardcode1M"), 
												boardcode2 = $("#boardcode2M"), 
												boardcode3 = $("#boardcode3M"), 
												code1name = $("#code1nameM"), 
												code2name = $("#code2nameM"), 
												code3name = $("#code3nameM"), 
												allFields = $([]).add(boardcode1).add(boardcode2).add(boardcode3).add(code1name).add(code2name).add(code3name);
		
												allFields.removeClass("ui-state-error");
												document.forms.categoryId.action = '<%=path%>/action/Category.htm?cmd=delete';
												document.forms.categoryId.boardCode1.value = boardcode1.val();
												document.forms.categoryId.boardCode2.value = boardcode2.val();
												document.forms.categoryId.boardCode3.value = boardcode3.val();
												document.forms.categoryId.code1Name.value = code1name.val();
												document.forms.categoryId.code2Name.value = code2name.val();
												document.forms.categoryId.code3Name.value = code3name.val();
												
												document.forms.categoryId.submit();
											$(this).dialog("close");
										},
										'<%=resource.getString("FS_T_CANCEL")%>' : function() {
											$(this).dialog("close");
										}
									},
									close : function() {
										allFields.val("").removeClass("ui-state-error");
										$(this).dialog("close");
									}
								});
				$("#dialogF")
						.dialog(
								{
									autoOpen : false,
									height : 200,
									width : 420,
									modal : true,
									buttons : {
										'<%=resource.getString("FS_T_SAVE")%>'  : function() {
											
												document.forms.imageFileForm.action = '<%=path%>/action/Category.htm';
												
												document.forms.imageFileForm.submit();
											
										},
										'<%=resource.getString("FS_T_CANCEL")%>'  : function() {
											$(this).dialog("close");
										}
									},
									close : function() {
										$(this).dialog("close");
									}
								});
				  
				$("#create-menu3").button().click(function() {
					$("#dialog3").dialog("open");
					updateTips('<%=resource.getString("FS_M_NOTBLANK")%>');
				});
		
				$("#create-menu2").button().click(function() {
					$("#dialog2").dialog("open");
					updateTips('<%=resource.getString("FS_M_NOTBLANK")%>');
				});
		
				$("#create-menu1").button().click(function() {
					$("#dialog1").dialog("open");
					updateTips('<%=resource.getString("FS_M_NOTBLANK")%>');
				});
		
				$("input:file.multi").MultiFile({accept: 'gif|jpg'});
			});
			
			function uploadImg(boardcode1,boardcode2,boardcode3){			
				document.forms.imageFileForm.boardCode1.value=boardcode1; 
				document.forms.imageFileForm.boardCode2.value=boardcode2; 
				document.forms.imageFileForm.boardCode3.value=boardcode3;
				$("#dialogF").dialog("open"); 
			}
			
			function viewContent(boardcode1,boardcode2,boardcode3){
				document.forms.categoryId.action = '<%=path%>/action/Category.htm?cmd=viewDetail';												
				document.forms.categoryId.boardCode1.value=boardcode1; 
				document.forms.categoryId.boardCode2.value=boardcode2; 
				document.forms.categoryId.boardCode3.value=boardcode3;
				document.forms.categoryId.submit();
			}
			
			function modify(boardcode1,boardcode2,boardcode3,code1name,code2name,code3name){
				$("#boardcode1M").val(boardcode1); 
				$("#boardcode2M").val(boardcode2); 
				$("#boardcode3M").val(boardcode3); 
				$("#code1nameM").val(code1name); 
				$("#code2nameM").val(code2name); 
				$("#code3nameM").val(code3name); 
				$("#code3nameM")[0].focus();		
				var Dlgheight = 640;		
				if(boardcode3=="FB0000")
				{			
					$("#board3")[0].style.display="none";
					$("#code2nameM").removeAttr("readonly");
					$("#code2nameM").removeClass("greyDisable");
					$("#code2nameM")[0].focus();
					Dlgheight-=200;
				}else{	
					$("#board3")[0].style.display="block";
					$("#code2nameM").attr("readonly","readonly");
					$("#code2nameM").addClass("greyDisable");		
				}	
				if(boardcode2=="FM0000")
				{				
					$("#board2")[0].style.display="none";
					$("#code1nameM").removeAttr("readonly");
					$("#code1nameM").removeClass("greyDisable");					
					$("#code1nameM")[0].focus();
					Dlgheight-=100;
				}else{
					$("#board2")[0].style.display="block";
					$("#code1nameM").attr("readonly","readonly");	
					$("#code1nameM").addClass("greyDisable");			
				}			
				$("#dialogM").dialog({height : Dlgheight}).dialog("open");
			}
			
			function getCode2Names(value){
				var lang = '<%=request.getSession().getAttribute("userLanguage")%>';
				/*CategoryAjaxController.getCode2Names(lang,value,
						{callback:function(dataFromServer){
								$('#boardcode23 option').each(function(){ 
										$(this).remove(); 
								}); 
								var code2Array = eval(dataFromServer);
								for(var i=0;i<code2Array.length ;i++){
									if(code2Array[i].value != "FM0000"){
										$("#boardcode23").append("<option value='"+code2Array[i].value+"'>"+code2Array[i].text+"</option>"); 
									}
								}
							} 
						}); 	*/
			}
		</script>
	</head>
	<body>
		
		<div class="wrapContent">		
			<form name="categoryId" method="post">
				<input type="hidden" name="boardCode1" value="" />
				<input type="hidden" name="boardCode2" value="" />
				<input type="hidden" name="boardCode3" value="" />
				<input type="hidden" name="code1Name" value="" />
				<input type="hidden" name="code2Name" value="" />
				<input type="hidden" name="code3Name" value="" />
			</form>
			<div id="dialog1" title="<%=resource.getString("FS_T_CREATE")%> <%=resource.getString("FS_T_BOARDCODE1")%>">
				<p class="validateTips">
					<%=resource.getString("FS_M_NOTBLANK")%>
				</p>
				<form name="dialog1form">
					<fieldset>
						<label for="boardcode11">
							<%=resource.getString("FS_T_CODEOF")%><%=resource.getString("FS_T_BOARDCODE1")%><%=resource.getString("FS_T_CODESUFFIX")%>
						</label>
						<input type="text" name="boardcode1" id="boardcode11"
							class="text ui-widget-content ui-corner-all" />
						<label for="code1name1">
							<%=resource.getString("FS_T_CODE1NAME")%>
						</label>
						<input type="text" name="code1name" id="code1name1"
							class="text ui-widget-content ui-corner-all" />
					</fieldset>					
				</form>
			</div>
			<div id="dialog2" title="<%=resource.getString("FS_T_CREATE")%> <%=resource.getString("FS_T_BOARDCODE2")%>">
				<p class="validateTips">
					<%=resource.getString("FS_M_NOTBLANK")%>
				</p>
				<form name="dialog2form">
					<fieldset>
						<label for="boardcode12">
							<%=resource.getString("FS_T_BOARDCODE1")%>
						</label>
						<select name="boardcode1" id="boardcode12" style="width:160px" >
						<% 
							Category category1 = null;
							if(code1names.size()>0) { 
							for(int i=0;i<code1names.size();i++){
							category1 = (Category)code1names.get(i);
						%>
							<option value="<%=category1.getId().getBoardCode1() %>"><%=category1.getCode1Name() %></option>
						<%}
						} %>
						</select>
					</fieldset>
					<fieldset>
						<label for="boardcode22">
							<%=resource.getString("FS_T_CODEOF")%><%=resource.getString("FS_T_BOARDCODE2")%><%=resource.getString("FS_T_CODESUFFIX")%>
						</label>
						<input type="text" name="boardcode2" id="boardcode22"
							class="text ui-widget-content ui-corner-all" />
						<label for="code2name2">
							<%=resource.getString("FS_T_CODE2NAME")%>
						</label>
						<input type="text" name="code2name" id="code2name2" value=""
							class="text ui-widget-content ui-corner-all" />
					</fieldset>
				</form>
			</div>
			<div id="dialog3" title="<%=resource.getString("FS_T_CREATE")%> <%=resource.getString("FS_T_BOARDCODE3")%>">
				<p class="validateTips">
					<%=resource.getString("FS_M_NOTBLANK")%>
				</p>
				<form name="dialog3form">
					<fieldset>
						<label for="boardcode13">
							<%=resource.getString("FS_T_BOARDCODE1")%>
						</label>
						<select name="boardcode1" id="boardcode13" style="width:160px" onChange="getCode2Names(this.value)">
						<% if(code1names.size()>0) { 
							for(int i=0;i<code1names.size();i++){
							category1 = (Category)code1names.get(i);
						%>
							<option value="<%=category1.getId().getBoardCode1() %>"><%=category1.getCode1Name() %></option>
						<%}
						} %>
						</select>
					</fieldset>
					<fieldset>
						<label for="boardcode23">
							<%=resource.getString("FS_T_BOARDCODE2")%>
						</label>
						<select name="boardcode2" id="boardcode23"  style="width:160px">
						<% if(code2names.size()>0) { 
							Category category2 = null;
							for(int i=0;i<code2names.size();i++){
							category2 = (Category)code2names.get(i);
							if(!"FM0000".equals(category2.getId().getBoardCode2())){
						%>
							<option value="<%=category2.getId().getBoardCode2() %>"><%=category2.getCode2Name() %></option>
						<%}}
						} %>
						</select>
					</fieldset>
					<fieldset>
						<label for="boardcode33">
							<%=resource.getString("FS_T_CODEOF")%><%=resource.getString("FS_T_BOARDCODE3")%><%=resource.getString("FS_T_CODESUFFIX")%>
						</label>
						<input type="text" name="boardcode3" id="boardcode33"
							class="text ui-widget-content ui-corner-all" />
						<label for="code3name3">
							<%=resource.getString("FS_T_CODE3NAME")%>
						</label>
						<input type="text" name="code3name" id="code3name3" value=""
							class="text ui-widget-content ui-corner-all" />
					</fieldset>
				</form>
			</div>
			<div id="dialogM" title="<%=resource.getString("FS_T_MODIFY")%> ">
				<p class="validateTips">
					
				</p>
				<form name="dialog3form">
					<fieldset id="board1" style="display:block">
						<label for="boardcode1M">
							<%=resource.getString("FS_T_CODEOF")%><%=resource.getString("FS_T_BOARDCODE1")%><%=resource.getString("FS_T_CODESUFFIX")%>
						</label>
						<input type="text" name="boardcode1" id="boardcode1M" readonly="readonly"
							class="text ui-widget-content ui-corner-all greyDisable" /><br/>
						<label for="code1nameM">
							<%=resource.getString("FS_T_CODE1NAME")%>
						</label>
						<input type="text" name="code1name" id="code1nameM" value=""
							readonly="readonly"	class="text ui-widget-content ui-corner-all greyDisable" />
					</fieldset>
					<fieldset id= "board2" style="display:block">
						<label for="boardcode2M">
							<%=resource.getString("FS_T_CODEOF")%><%=resource.getString("FS_T_BOARDCODE2")%><%=resource.getString("FS_T_CODESUFFIX")%>
						</label>
						<input type="text" name="boardcode2" id="boardcode2M" readonly="readonly"
							class="text ui-widget-content ui-corner-all greyDisable" /><br/>
						<label for="code2nameM">
							<%=resource.getString("FS_T_CODE2NAME")%>
						</label>
						<input type="text" name="code2name" id="code2nameM" value=""
							readonly="readonly" class="text ui-widget-content ui-corner-all greyDisable" />
					</fieldset>
					<fieldset id="board3">
						<label for="boardcode3M">
							<%=resource.getString("FS_T_CODEOF")%><%=resource.getString("FS_T_BOARDCODE3")%><%=resource.getString("FS_T_CODESUFFIX")%>
						</label>
						<input type="text" name="boardcode3" id="boardcode3M" readonly="readonly"
							class="text ui-widget-content ui-corner-all greyDisable" /><br/>
						<label for="code3nameM">
							<%=resource.getString("FS_T_CODE3NAME")%>
						</label>
						<input type="text" name="code3name" id="code3nameM" value=""
							class="text ui-widget-content ui-corner-all " />
					</fieldset>
				</form>
			</div>
			<div id="dialogF" title="<%=resource.getString("FS_T_UPLOADIMAGE")%>">
				<form name="imageFileForm" enctype="multipart/form-data" method="post">					
					<fieldset>						
						<input type="file" name="imageFile" accept="jpg|gif" class="multi text ui-widget-content ui-corner-all " style="width:340px"  />
						<input type="hidden" name="boardCode1" value="" />
						<input type="hidden" name="boardCode2" value="" />
						<input type="hidden" name="boardCode3" value="" />
						<input type="hidden" name="cmd" value="uploadImg" />
					</fieldset>
				</form>
			</div>

			<div class="ui-widget categoryList">
				<h1>
					 <%=resource.getString("FS_T_TOTALCOUNT")%> :  <%=counts %> 
				</h1>
				<table class="ui-widget ui-widget-content">
					<thead>
						<tr class="ui-widget-header ">
							<th>
								<%=resource.getString("FS_T_BOARDCODE1")%>
								<div id="create-menu1"></div>
							</th>
							<th>
								<%=resource.getString("FS_T_BOARDCODE2")%>
								<div id="create-menu2"></div>
							</th>
							<th>
								<%=resource.getString("FS_T_BOARDCODE3")%>
								<div id="create-menu3"></div>
							</th>
							<th>
								<%=resource.getString("FS_T_OPERATION")%>
							</th>
							<th>
								<%=resource.getString("FS_T_UPLOADIMAGE")%>
							</th>
							<th>
								<%=resource.getString("FS_T_CONTENT")%>
							</th>
						</tr>
					</thead>
					<tbody>
					<% if(categorylist.size()>0) { 
							Category category = null;
							for(int i=0;i<categorylist.size();i++){
							category = (Category)categorylist.get(i);
					%>
					
						<tr>
							<td>
								<%=category.getCode1Name() %>
							</td>
							<td>
								<%=category.getCode2Name() %>
							</td>
							<td>
								<%=category.getCode3Name() %>
							</td>
							<td>
								<a href="javascript:modify('<%=category.getId().getBoardCode1() %>','<%=category.getId().getBoardCode2() %>','<%=category.getId().getBoardCode3() %>','<%=category.getCode1Name() %>','<%=category.getCode2Name() %>','<%=category.getCode3Name() %>')" ><%=resource.getString("FS_T_MODIFY")%></a>
							</td>
							<td>
								<a href="javascript:uploadImg('<%=category.getId().getBoardCode1() %>','<%=category.getId().getBoardCode2() %>','<%=category.getId().getBoardCode3() %>')" ><%=resource.getString("FS_T_UPLOADIMAGE")%></a>
							</td>
							<td>
								<a href="javascript:viewContent('<%=category.getId().getBoardCode1() %>','<%=category.getId().getBoardCode2() %>','<%=category.getId().getBoardCode3() %>')" ><%=resource.getString("FS_T_VIEW")%><%=resource.getString("FS_T_CONTENT")%></a>
							</td>
						</tr>
					<%	}
					}else{ %>
						<tr>
							<td colspan="6">
								<%=resource.getString("FS_M_NORESULT")%>
							</td>
						</tr>
					<%} %>
					</tbody>
				</table>
			</div>


		</div>
	</body>
</html>